<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Application monitor portal</title>
		<meta name="description" content="LOG Reporter Portal">
		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
		<meta http-equiv="Expires" content="0">
		<link href="themes/style.css" rel="stylesheet" type="text/css">
		<script src="scripts/jquery-1.9.1.js" type="text/javascript"></script>
	</head>

	<body>
		<script type="text/javascript">
			var refreshId;
		    function startRefresh() 
			{
		    	refreshId = -1;
		    	refresh();
			}
		    function stopRefresh() 
			{
		    	clearInterval(refreshId);
		    	refreshId = -1;
                $('#refresh_bar').html('<button type="button" onClick="startRefresh();">Start Auto Refresh</button>');
			}
		    function refresh() 
			{
			    $.ajaxSetup({ cache: false });
		        $.ajax({
		            url : 'activity?action=get',
		            data : 'force=' + (refreshId == -1),
		            dataType : 'html',
		            success : function(result, status)
		            { 
		                if (result != '')
		                {
		                	$('#mainContent').html(result);
		                }
		                $('#error').html(' ');
		                if (refreshId == -1)
	                	{
		    		    	refreshId = setInterval(refresh, 5000);
		                    $('#refresh_bar').html('<button type="button" onClick="stopRefresh();">Stop Auto Refresh</button>');
	                	}
		            },
			        error : function(result, status, error)
			        {
		                $('#error').html('An error occured: '+status+' '+result.status+', '+error);
		                stopRefresh();
			        },
		         });
			}
		    function raiseErrors(source) 
			{
			    $.ajaxSetup({ cache: false });
		        $.post('activity?action=raise','source=' + source);
			}
		    function coolErrors(source) 
			{
			    $.ajaxSetup({ cache: false });
		        $.post('activity?action=cool','source=' + source);
			}
			
			$(document).ready(function()
			{
			 	/* listen click event on buuton */
			    $("#start_com").click(startRefresh);
			});
		</script>

		<div class="wrapper">
			<div id="header">
				<div id="header_title">
					<h2>Application monitoring - Real time fault detection</h2>
				</div>
			</div>

			<table class="content even">
			  <tr>
			    <td class="left"><a href="http://www.systar.com/" title="Introduction to Application monitoring" ><img src="themes/images/icon_compass.png" alt="Introduction" /></a>
			      <h3><a href="http://www.systar.com/">Introduction to Application monitoring</a></h3>
			      <p>Learn how you can monitor your application faults</p></td>
			    <td class="right"><a href="site/Getting%20Started.htm" title="Getting Started"><img src="themes/images/icon_start.png" alt="Getting started" /></a>
			      <h3><a href="site/Getting%20Started.htm">Getting Started</a></h3>
			      <p>Prepare your environment for application monitoring</p></td>
			  </tr>
			  <tr>
			    <td class="left"><a href="site/MeasuringPerformance.htm" title="Measuring " ><img src="themes/images/icon_measure.png" alt="Measuring Performance" /></a>
			      <h3><a href="site/MeasuringPerformance.htm">Measuring Performance</a></h3>
			      <p>Some performance test cases</p></td>
			    <td class="right"><a href="site/FAQ.htm" title="Frequently asked questions" ><img src="themes/images/icon_faq.png" alt="FAQ" /></a>
			      <h3><a href="site/FAQ.htm" title="Frequently asked questions" >FAQ</a></h3>
			      <p>Find answers to some frequently asked questions</p></td>
			  </tr>
			</table>
		   	<div id="error"></div>
		   	<div id="refresh_bar"></div>
			<div id="mainContent">
				<a href="#" id="start_com" title="Launch the monitoring">
					<img src="themes/images/icon_download.png">
					<h3>Launch the monitoring</h3>
				</a>
				<div class="extraContent">
					<h3>Prerequisites</h3>
					<p> 
						<ul>
							<li>Configure the program LogCollector with your applications output directories</li>
							<li>Launch as many LogCollector programs as needed</li>
						</ul>
					</p>
				</div>
			</div>
		   	<div class="push"></div>
		</div>
 		<div class="footer">
		  <p>Application monitoring - Online fault detection</p>
		</div>
	</body>

</html>